<?php

use Illuminate\Database\Seeder;

class StuTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $list = array(
            ['name'=>'zhangsan','sex'=>"m",'age'=>20,'classid'=>'lamp149'],
            ['name'=>'李四','sex'=>"m",'age'=>20,'classid'=>'lamp149'],
            ['name'=>'王五','sex'=>"w",'age'=>22,'classid'=>'lamp149'],
            ['name'=>'赵六','sex'=>"m",'age'=>28,'classid'=>'lamp150'],
            ['name'=>'夏莉','sex'=>"w",'age'=>19,'classid'=>'lamp149'],
            ['name'=>'小王','sex'=>"m",'age'=>22,'classid'=>'lamp149'],
            ['name'=>'小丽','sex'=>"w",'age'=>23,'classid'=>'lamp149']
        );
        //遍历
        foreach($list as $stu){
            \DB::table("stu")->insert($stu);
        }
    }
}
